<?php if (!defined('THINK_PATH')) exit(); /*a:2:{s:75:"E:\phpStudy\WWW\blog\Public/../application/admin\view\article\add_cate.html";i:1495100519;s:72:"E:\phpStudy\WWW\blog\Public/../application/admin\view\public\header.html";i:1495098301;}*/ ?>
<!DOCTYPE html>
<html>
<head>
  <meta charset="UTF-8">
    <title>波仔博客后台管理系统</title>
    <link rel="stylesheet" href="__PUBLIC__layui/css/layui.css">
    <link rel="stylesheet" href="__PUBLIC__css/global.css">
    <script type="text/javascript" src="__PUBLIC__layui/layui.js"></script>
    <script type="text/javascript" src="https://code.jquery.com/jquery-3.2.1.js"></script>
    
</head>
<body>
<div class="layui-tab-brief main-tab-container">
    <ul class="layui-tab-title main-tab-title">
      <a href="<?php echo url('article/index_cate'); ?>"><li>栏目列表</li></a>
      <a href="<?php echo url('article/add_cate'); ?>"><li class="layui-this">添加栏目</li></a>
      <div class="main-tab-item">栏目管理</div>
    </ul>
    <div class="layui-tab-content">
      <div class="layui-tab-item layui-show">
        <form class="layui-form" name="add_cate" method="post" action="">
          <div class="layui-tab layui-tab-card">
            <ul class="layui-tab-title">
              <li class="layui-this">基本选项</li>
              <!-- <li>模板设置</li> -->
              <!-- <li>SEO设置</li> -->
            </ul>
            <div class="layui-tab-content">
              <div class="layui-tab-item layui-show">
                <!-- <div class="layui-form-item">
                  <label class="layui-form-label">选择模型</label>
                  <div class="layui-input-inline input-custom-width">
                    <select name="model_id" lay-verify="required"><option value="">请选择</option><option value="1">单页模型</option><option value="2">文章模型</option><option value="3">图集模型</option><option value="4">链接模型</option><option value="5">下载模型</option></select>
                  </div>
                  <div class="layui-form-mid layui-word-aux"></div>
                </div> -->
                <div class="layui-form-item">
                  <label class="layui-form-label">上级栏目</label>
                  <div class="layui-input-inline input-custom-width">
                    <select name="parent_id" lay-verify="">
                      <option value="0" selected="">≡ 作为一级栏目 ≡</option>
                      <option value="1">学无止境</option>
                    </select>
                  </div>
                  <div class="layui-form-mid layui-word-aux"></div>
                </div>
                <div class="layui-form-item">
                  <label class="layui-form-label">栏目名称</label>
                  <div class="layui-input-inline input-custom-width">
                    <input type="text" name="name" value="" lay-verify="required" autocomplete="off" placeholder="请输入栏目名称" class="layui-input">
                  </div>
                </div>

                <div class="layui-form-item">
                  <label class="layui-form-label">栏目描述</label>
                  <div class="layui-input-inline input-custom-width">
                    <textarea name="description" lay-verify="" autocomplete="off" placeholder="请输入栏目描述" class="layui-textarea"></textarea>
                  </div>
                </div>

                <!-- <div class="layui-form-item">
                  <label class="layui-form-label">栏目图片</label>
                  <div class="layui-input-inline input-custom-width">
                    <input type="text" name="image_url" value="" lay-verify="" autocomplete="off" placeholder="" class="layui-input"><div class="layui-box layui-upload-button"><span class="layui-upload-icon"><i class="layui-icon"></i>图片</span></div>
                  </div>
                  <div class="layui-form-mid layui-word-aux"></div>
                </div> -->
                <div class="layui-form-item">
                  <label class="layui-form-label">排序</label>
                  <div class="layui-input-inline input-custom-width">
                    <input type="text" name="sort" value="20" lay-verify="number" autocomplete="off" placeholder="数字越小越靠前" class="layui-input">
                    </div>
                </div>
                <div class="layui-form-item">
                  <label class="layui-form-label">是否导航显示</label>
                  <div class="layui-input-inline input-custom-width">
                    <input type="radio" name="status" value="1" title="是" checked=""><div class="layui-unselect layui-form-radio layui-form-radioed"><i class="layui-anim layui-icon"></i><span>是</span></div>
                    <input type="radio" name="status" value="0" title="否"><div class="layui-unselect layui-form-radio"><i class="layui-anim layui-icon"></i><span>否</span></div></div>
                    <div class="layui-form-mid layui-word-aux">
                  </div>
                </div>
              </div>
              <!-- <div class="layui-tab-item">
                <div class="layui-form-item">
                  <label class="layui-form-label">封面模版名称</label>
                  <div class="layui-input-inline input-custom-width">
                    <input type="text" name="name" value="" lay-verify="required" autocomplete="off" placeholder="请输入栏目名称" class="layui-input">
                  </div>
                </div>
                <div class="layui-form-item">
                  <label class="layui-form-label">列表页模版名称</label>
                  <div class="layui-input-inline input-custom-width">
                    <input type="text" name="name" value="" lay-verify="required" autocomplete="off" placeholder="请输入栏目名称" class="layui-input">
                  </div>
                </div>
                <div class="layui-form-item">
                  <label class="layui-form-label">详情页模版名称</label>
                  <div class="layui-input-inline input-custom-width">
                    <input type="text" name="name" value="" lay-verify="required" autocomplete="off" placeholder="请输入栏目名称" class="layui-input">
                  </div>
                </div>
              
              </div> -->
              <!-- <div class="layui-tab-item">
                <div class="layui-form-item">
                  <label class="layui-form-label">栏目名称</label>
                  <div class="layui-input-inline input-custom-width">
                    <input type="text" name="name" value="" lay-verify="required" autocomplete="off" placeholder="请输入栏目名称" class="layui-input">
                  </div>
                </div>

                <div class="layui-form-item">
                  <label class="layui-form-label">栏目描述</label>
                  <div class="layui-input-inline input-custom-width">
                    <textarea name="description" lay-verify="" autocomplete="off" placeholder="请输入栏目描述" class="layui-textarea"></textarea>
                  </div>
                </div>
              </div> -->
              <div class="layui-form-item">
                <div class="layui-input-block">
                  <button class="layui-btn" lay-submit="" lay-filter="cate_add" type="button">立即提交</button>
                </div>
              </div>
            </div>
          </div>
        </form>
      </div>
    </div>
</div>
<script type="text/javascript">
  $(function(){
        //按钮单击时执行
        $(".layui-btn").click(function(){    
            $.ajax({
              url: "<?php echo url('article/add_cate'); ?>",
              data: $("form").serialize(),
              type: "POST",
              datatype:"json",
              success: function( result ) {
                  console.log(result);
              }
            });
         });
    });
</script>
<script type="text/javascript">
layui.use(['element', 'form'], function(){
  var element = layui.element()
  ,form = layui.form()
  ,jq = layui.jquery;
})
</script>
</body>
</html>

